#include <stdio.h>
#include <math.h>

/************************************************************************/
/*                                                                      */
/************************************************************************/
#define PI 3.14159265

/************************************************************************/
/*                                                                      */
/************************************************************************/
const double tan_tab[360 + 1] =
{
      0.000000,
      0.017455,   0.034921,   0.052408,   0.069927,   0.087489,   0.105104,   0.122785,   0.140541,   0.158384,    0.176327,   0.194380,    0.212557,    0.230868,    0.249328,   0.267949,   
      0.286745,   0.305731,   0.324920,   0.344328,   0.363970,   0.383864,   0.404026,   0.424475,   0.445229,    0.466308,   0.487733,    0.509525,    0.531709,    0.554309,   0.577350,   
      0.600861,   0.624869,   0.649408,   0.674509,   0.700208,   0.726543,   0.753554,   0.781286,   0.809784,    0.839100,   0.869287,    0.900404,    0.932515,    0.965689,   1.000000,   
      1.035530,   1.072369,   1.110613,   1.150368,   1.191754,   1.234897,   1.279942,   1.327045,   1.376382,    1.428148,   1.482561,    1.539865,    1.600335,    1.664279,   1.732051,   
      1.804048,   1.880726,   1.962610,   2.050304,   2.144507,   2.246037,   2.355852,   2.475087,   2.605089,    2.747477,   2.904211,    3.077684,    3.270853,    3.487414,   3.732051,   
      4.010781,   4.331476,   4.704630,   5.144554,   5.671282,   6.313751,   7.115370,   8.144346,   9.514364,   11.430052,  14.300666,   19.081136,   28.636252,   57.289956,   557135183.944155,//无穷大
    -57.289968, -28.636255, -19.081137, -14.300667, -11.430053,  -9.514365,  -8.144347,  -7.115370,  -6.313752,   -5.671282,  -5.144554,   -4.704630,   -4.331476,   -4.010781,  -3.732051, 
     -3.487414,  -3.270853,  -3.077684,  -2.904211,  -2.747477,  -2.605089,  -2.475087,  -2.355852,  -2.246037,   -2.144507,  -2.050304,   -1.962611,   -1.880726,   -1.804048,  -1.732051,  
     -1.664279,  -1.600335,  -1.539865,  -1.482561,  -1.428148,  -1.376382,  -1.327045,  -1.279942,  -1.234897,   -1.191754,  -1.150368,   -1.110613,   -1.072369,   -1.035530,  -1.000000,  
     -0.965689,  -0.932515,  -0.900404,  -0.869287,  -0.839100,  -0.809784,  -0.781286,  -0.753554,  -0.726543,   -0.700208,  -0.674509,   -0.649408,   -0.624869,   -0.600861,  -0.577350,  
     -0.554309,  -0.531709,  -0.509525,  -0.487733,  -0.466308,  -0.445229,  -0.424475,  -0.404026,  -0.383864,   -0.363970,  -0.344328,   -0.324920,   -0.305731,   -0.286745,  -0.267949,  
     -0.249328,  -0.230868,  -0.212557,  -0.194380,  -0.176327,  -0.158384,  -0.140541,  -0.122785,  -0.105104,   -0.087489,  -0.069927,   -0.052408,   -0.034921,   -0.017455,  -0.000000,  
      0.017455,   0.034921,   0.052408,   0.069927,   0.087489,   0.105104,   0.122785,   0.140541,   0.158384,    0.176327,   0.194380,    0.212557,    0.230868,    0.249328,   0.267949,   
      0.286745,   0.305731,   0.324920,   0.344328,   0.363970,   0.383864,   0.404026,   0.424475,   0.445229,    0.466308,   0.487733,    0.509525,    0.531709,    0.554309,   0.577350,   
      0.600861,   0.624869,   0.649408,   0.674509,   0.700208,   0.726543,   0.753554,   0.781286,   0.809784,    0.839100,   0.869287,    0.900404,    0.932515,    0.965689,   1.000000,   
      1.035530,   1.072369,   1.110613,   1.150368,   1.191754,   1.234897,   1.279942,   1.327045,   1.376382,    1.428148,   1.482561,    1.539865,    1.600335,    1.664279,   1.732051,   
      1.804048,   1.880726,   1.962610,   2.050304,   2.144507,   2.246037,   2.355852,   2.475087,   2.605089,    2.747477,   2.904211,    3.077684,    3.270853,    3.487414,   3.732051,   
      4.010781,   4.331476,   4.704630,   5.144554,   5.671282,   6.313751,   7.115370,   8.144346,   9.514364,   11.430052,  14.300666,   19.081136,   28.636252,   57.289956,   185711735.639448,//无穷大
    -57.289968, -28.636255, -19.081137, -14.300667, -11.430053,  -9.514365,  -8.144347,  -7.115370,  -6.313752,   -5.671282,  -5.144554,   -4.704630,   -4.331476,   -4.010781,  -3.732051, 
     -3.487414,  -3.270853,  -3.077684,  -2.904211,  -2.747477,  -2.605089,  -2.475087,  -2.355852,  -2.246037,   -2.144507,  -2.050304,   -1.962611,   -1.880726,   -1.804048,  -1.732051,  
     -1.664279,  -1.600335,  -1.539865,  -1.482561,  -1.428148,  -1.376382,  -1.327045,  -1.279942,  -1.234897,   -1.191754,  -1.150368,   -1.110613,   -1.072369,   -1.035530,  -1.000000,  
     -0.965689,  -0.932515,  -0.900404,  -0.869287,  -0.839100,  -0.809784,  -0.781286,  -0.753554,  -0.726543,   -0.700208,  -0.674509,   -0.649408,   -0.624869,   -0.600861,  -0.577350,  
     -0.554309,  -0.531709,  -0.509525,  -0.487733,  -0.466308,  -0.445229,  -0.424475,  -0.404026,  -0.383864,   -0.363970,  -0.344328,   -0.324920,   -0.305731,   -0.286745,  -0.267949,  
     -0.249328,  -0.230868,  -0.212557,  -0.194380,  -0.176327,  -0.158384,  -0.140541,  -0.122785,  -0.105104,   -0.087489,  -0.069927,   -0.052408,   -0.034921,   -0.017455,  -0.000000,  
};
/************************************************************************/
/*                                                                      */
/************************************************************************/

int main(int argc, char* argv[])
{
    int i;
    
    for(i = 1; i < 361; i++)
    {
        if((i - 1) % 15 == 0)
            printf("\n");
        
        printf("%f, ", tan(i * PI / 180));//转换为弧度值
    }
    
    printf("\n");
    
    for(i = 1; i < 361; i++)
    {
        if((i - 1) % 15 == 0)
            printf("\n");
        
        printf("%f, ", tan_tab[i]);
    }
    
    printf("\n");
    
    return 0;
}